def is_palindrome1(n):
    I,m=n,0
    while I:
        m=m*10+I%10
        I=I//10
    return(n==m)
 

def is_palindrome(n):
	return str(n) == str(n)[::-1]
L = list(filter(is_palindrome, range(1000)))
print(L)

